<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <div id="app">
        <!-- 只要关心操作数据，数据一旦改变界面就会自动跟着变 -->
        <button @click="list.push('赵六')">添加li</button>
        <ul>
            <li v-for="item in list">{{ item }}</li>
        </ul>
   </div>
   <script src="./vue.js"></script>
   <script>
        new Vue({
            el: '#app',
            data() {
                return {
                   list: ['张三', '李四', '王五']
                }
            },
        })
   </script>
</body>
</html>